#ifndef SHINGLES_H
#define SHINGLES_H

#include "shingles_global.h"
#include "structs.h"
#include <QVector>
#include <QCryptographicHash>


extern "C" __declspec(dllexport) bool GetDist(QList<Doc> &Docs,
                                              QVector<double> Params,
                                              QVector<QVector<double> > & Result);
extern "C" __declspec(dllexport) bool GetParams(QList<Parameters> &Params);

QString md5Hash(QString str)
{
    QCryptographicHash md5(QCryptographicHash::Md5);
    md5.addData(str.toAscii());
    return md5.result().toHex().constData();
}

int Min( const int x, const int y )
{
   return ( x > y ) ? y : x;
}

#endif // SHINGLES_H
